package cn.xdmnb.cloud.blog.core.constant.oauth;

import cn.xdmnb.cloud.blog.core.constant.KeyConstant;

/**
 * @author yukai
 * @since 2023年01月05日 16:01
 */
public interface OAuthConstant {

    String TOKEN_NAME = "jwt-token";

    String PRINCIPAL_NAME = "principal";

    String AUTHORITIES_NAME = "authorities";

    String USER_ID = "user_id";

    String GENDER = "gender";

    String AVATAR = "avatar";

    String MOBILE = "mobile";

    String EMAIL = "email";

    String NICK_NAME = "nick_name";

    String JTI = "jti";

    String EXPR = "expr";

    /**
     * 权限<->url对应的KEY
     */
    String OAUTH_URLS= KeyConstant.REDIS_KEY_PREFIX+"oauth2:oauth_urls";

    /**
     * JWT令牌黑名单的KEY
     */
    String JTI_KEY_PREFIX=KeyConstant.REDIS_KEY_PREFIX+"oauth2:black:";

    /**
     * 角色前缀
     */
    String ROLE_PREFIX="ROLE_";

    String METHOD_SUFFIX=":";

    String ROLE_ROOT_CODE=ROLE_PREFIX+"ROOT";

}
